﻿Public Class BEGrupoAcesso
  Private _intIdGrupo As Integer
  Private _strNome As String
  Private _strDescricao As String
  ' Permissões do Grupo quando selecionada uma única Tela
  Private _booLeitura As Boolean
  Private _booEscrita As Boolean
  Private _booModificacao As Boolean
  Private _booExclusao As Boolean

  Private _lstUsuarios As New List(Of BEUsuario)
  Private _lstTelas As New List(Of BETela)

  Sub New()
    _intIdGrupo = 0
    _strNome = ""
    _strDescricao = ""

    _booLeitura = False
    _booEscrita = False
    _booModificacao = False
    _booExclusao = False
  End Sub

  Sub New(ByVal intIdGrupo As Integer)
    Me.New()
    _intIdGrupo = intIdGrupo
  End Sub

  Sub New(ByVal strNome As String)
    Me.New()
    _strNome = strNome
  End Sub

  Sub New(ByVal strNome As String, ByVal strDescricao As String)
    Me.New()
    _strNome = strNome
    _strDescricao = strDescricao
  End Sub

  Sub New(ByVal idGrupo As Integer, ByVal strNome As String, ByVal strDescricao As String)
    Me.New()
    _intIdGrupo = idGrupo
    _strNome = strNome
    _strDescricao = strDescricao
  End Sub

  Public Property IdGrupo() As Integer
    Get
      Return _intIdGrupo
    End Get
    Set(ByVal value As Integer)
      _intIdGrupo = value
    End Set
  End Property

  Public Property Nome() As String
    Get
      Return _strNome
    End Get
    Set(ByVal value As String)
      _strNome = value
    End Set
  End Property

  Public Property Descricao() As String
    Get
      Return _strDescricao
    End Get
    Set(ByVal value As String)
      _strDescricao = value
    End Set
  End Property

  Public Property Leitura() As Boolean
    Get
      Return _booLeitura
    End Get
    Set(ByVal value As Boolean)
      _booLeitura = value
    End Set
  End Property

  Public Property Escrita() As Boolean
    Get
      Return _booEscrita
    End Get
    Set(ByVal value As Boolean)
      _booEscrita = value
    End Set
  End Property

  Public Property Modificacao() As Boolean
    Get
      Return _booModificacao
    End Get
    Set(ByVal value As Boolean)
      _booModificacao = value
    End Set
  End Property

  Public Property Exclusao() As Boolean
    Get
      Return _booExclusao
    End Get
    Set(ByVal value As Boolean)
      _booExclusao = value
    End Set
  End Property

  Public Property Usuarios() As List(Of BEUsuario)
    Get
      Return _lstUsuarios
    End Get
    Set(ByVal value As List(Of BEUsuario))
      _lstUsuarios = value
    End Set
  End Property

  Public Property Telas() As List(Of BETela)
    Get
      Return _lstTelas
    End Get
    Set(ByVal value As List(Of BETela))
      _lstTelas = value
    End Set
  End Property

End Class
